﻿using System;
using System.IO;
using System.Net;
using System.Text;
using CSharpExt.IO;

namespace CSharpExt.Net.Http
{
    public static class WebResponseHelper
    {
        public static String GetContent(this WebResponse wr)
        {
            Stream rs = wr.GetResponseStream();
            ByteStream bs = new ByteStream();
            rs.CopyTo(bs);

            return Encoding.ASCII.GetString(bs.Buffer, 0, (int)bs.Length);
        }
    }
}
